package com.dave.getaway.app.controller;

import com.dave.getaway.app.model.Provider;
import com.dave.getaway.app.service.GetaWayGenericService;
import com.dave.getaway.app.service.ProviderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author wangwj
 * @version 1.0
 * @date 2021/12/16
 * @description: TODO
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/getaway/message")
public class MessageController {


    private final GetaWayGenericService getaWayGenericService;

    private final ProviderService providerService;

    @RequestMapping("/all")
    public List<Provider> allService(){
        return providerService.getServiceDTOS();
    }


    @RequestMapping("/forward")
    public String forward(String text) {
        return getaWayGenericService.sayHello(text);
    }


    @RequestMapping("/forward2")
    public String forward2(String name) {
        return getaWayGenericService.sayHello2(name);
    }
}
